package ThreadDemo2;

/**
 * @Author Zhang Chao
 * @Date 2021/6/1 19:41
 * @Version 1.0
 */
public class Goods {

    //属性
    //商品名
    private String goodName;

    //价格
    private Double goodPrice;

    public Goods(String goodName, double goodPrice) {
        this.goodName = goodName;
        this.goodPrice = goodPrice;
    }

    public String getGoodName() {
        return goodName;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    public double getGoodPrice() {
        return goodPrice;
    }

    public void setGoodPrice(double goodPrice) {
        this.goodPrice = goodPrice;
    }

    // 打印商品信息

    @Override
    public String toString() {
        return "Goods{" +
                "goodName='" + goodName + '\'' +
                ", goodPrice='" + goodPrice + '\'' +
                '}';
    }


}
